import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 会议报名发票信息信息 */
export interface ConferenceInvoiceInformation {
          id: number; // 发票信息id
          conferenceRegistrationId?: number; // 会议报名id
          invoiceType: string; // 发票类型
          invoiceUnitName: string; // 发票单位名称
          invoicePhone: string; // 发票电话
          invoiceTaxId: string; // 发票税号
          invoiceOpeningBank: string; // 发票开户行
          invoiceAccountNumber: string; // 发票账号
          invoiceAddress: string; // 发票地址
  }

// 会议报名发票信息 API
export const ConferenceInvoiceInformationApi = {
  // 查询会议报名发票信息分页
  getConferenceInvoiceInformationPage: async (params: any) => {
    return await request.get({ url: `/biz/conference-invoice-information/page`, params })
  },

  // 查询会议报名发票信息详情
  getConferenceInvoiceInformation: async (id: number) => {
    return await request.get({ url: `/biz/conference-invoice-information/get?id=` + id })
  },

  // 新增会议报名发票信息
  createConferenceInvoiceInformation: async (data: ConferenceInvoiceInformation) => {
    return await request.post({ url: `/biz/conference-invoice-information/create`, data })
  },

  // 修改会议报名发票信息
  updateConferenceInvoiceInformation: async (data: ConferenceInvoiceInformation) => {
    return await request.put({ url: `/biz/conference-invoice-information/update`, data })
  },

  // 删除会议报名发票信息
  deleteConferenceInvoiceInformation: async (id: number) => {
    return await request.delete({ url: `/biz/conference-invoice-information/delete?id=` + id })
  },

  /** 批量删除会议报名发票信息 */
  deleteConferenceInvoiceInformationList: async (ids: number[]) => {
    return await request.delete({ url: `/biz/conference-invoice-information/delete-list?ids=${ids.join(',')}` })
  },

  // 导出会议报名发票信息 Excel
  exportConferenceInvoiceInformation: async (params) => {
    return await request.download({ url: `/biz/conference-invoice-information/export-excel`, params })
  },
}